﻿using UnityEngine;
using System.Collections;

public class FirstCheckPointUtil
{
    public static int curUltiIndex = 0;

    public static void CheckPoint(EnterGameCheckPointEnum e)
    {
        ProtoBuf.Message.CSCheckPoint msg = new ProtoBuf.Message.CSCheckPoint();
        msg.appVersion = GameConfig.Instance.AppVersion;
        msg.resVersoin = GameConfig.Instance.ResVersion;
        msg.channelId = GameConfig.Instance.GetChannelId;
        msg.channelName = GameConfig.Instance.GetChannelName;
        msg.deviceId = GameConfig.Instance.GetDeviceID;//唯一的设备标示
        msg.deviceDesc = SystemInfo.deviceModel;//设备型号
        msg.point = (int)e;

        NetAPI.SendHttpInBackground(ProtoBuf.Message.OpDefine.CSCheckPoint, msg, (pack, b) =>
        {
            if (b)
            {
                Debug.Log("CheckPoint [" + e.ToString() + "] success.");
            }

        });

    }
}